home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 1
/
Nebula One.iso
/
Misc
/
msql-1.0.6
/
src
/
common
/
ualarm.c
< prev
Wrap
C/C++ Source or Header
|
1994-09-07
|
890b
|
47 lines
/*
** ualarm.c -
**
**
** Copyright (c) 1993 David J. Hughes
**
** Permission to use, copy, and distribute for non-commercial purposes,
** is hereby granted without fee, providing that the above copyright
** notice appear in all copies and that both the copyright notice and this
** permission notice appear in supporting documentation.
**
** This software is provided "as is" without any expressed or implied warranty.
**
*/
#ifndef lint
static char RCSid[] =
"ualarm.c,v 1.2 1994/07/05 02:01:00 bambi Exp";
#endif
#include<sys/time.h>
#include <common/portability.h>
#ifndef HAVE_UALARM
ualarm(val, interval)
unsigned val,
interval;
{
struct itimerval value;
value.it_interval.tv_sec = 0;
value.it_interval.tv_usec = (long) interval;
value.it_value.tv_sec = 0;
value.it_value.tv_usec = (long) val;
setitimer(ITIMER_REAL,&value,(struct itimerval *)0);
}
#endif